<?php

/**
 * =============================================================================
 * Define modules, sidebar menus, define permistion need for modules 
 * =============================================================================
 * 
 * Example:
 * 1. Example for define one module note display but required super user and 
 * edit/add permistion for access
 * 
 * 'system_setting' => array(
 *       'su_mode' => true,
 *       'name'=>'System Setting'
 *       'permistions' => array('add'=>"Add", 'edit'=>"Edit"),
 * )
 * 
 * - name: Name for display when setup permistion for this module
 * - su_mode: Default is false
 * - permistions default is empty array
 * 
 * 2. Example for define one module with permistion and display it in sidemenu
 * 
 * 'analytics' => array(
 *       'su_mode' => true,
 *       'name'=>'Analytics data'
 *       'permistions' => array('view'=>"View", 'analytics'=>"Analytics Data"),
 *       'display'=>array(               
 *              'title' => "Trang chủ",
 *              'fa-icon' => 'tachometer',
 *              'url' => '/',
 *          )
 * ),
 * 
 * - name: Name for display when setup permistion for this module
 * - su_mode, permistions same as example 1
 * - display is array for display information
 * - title is required for title display in side bar
 * - fa-icon is font-awsomewhere icon for display. Default it have get 
 * in "probackend::config.default_module_icon"
 * - url is link when user click it
 * 
 * 3. Example for define one module with permistion and display it in side menu 
 * with 2 level menu. Just simple add sections item folowing below
 * 
 *  
 * 'analytics' => array(
 *       'su_mode' => true,
 *       'name'=>'Analytics data'
 *       'permistions' => array('view'=>"View", 'analytics'=>"Analytics Data"),
 *       'display'=>array(               
 *              'title' => "Trang chủ",
 *              'fa-icon' => 'tachometer',
 *              'sections' => array(
 *                  'Danh sách quản trị viên' => 'admin_users/listing',
 *                  'Tạo quản trị viên mới' => 'admin_users/create',
 *              ),
 *       )
 * ),
 * 
 * Note: Please skip url field if you want to create 2 level menu for your 
 * modules. If you add url field, anyway this is 1 level module.
 * 
 */
return [
    'sites' => [
        'prefix' => 'admin_fcp',
        'title' => 'ProBackend',
        'languages' => [
            'en' => "English",
            'ch' => "中国",
            'vi' => "Tiếng việt"
        ],
        'flags' => [
            'en' => '/packages/johnm/probackend/images/flags/en.gif',
            'vi' => '/packages/johnm/probackend/images/flags/vi.gif',
            'ch' => '/packages/johnm/probackend/images/flags/ch.gif',
        ],
        'default_module_icon' => "icon-table2",
        'logo' => '/packages/johnm/probackend/images/logo.png',
        //if you want set logo text, please leave empty logo config above
        'logo-text' => 'Probackend',
        'avatar-default' => '/packages/johnm/probackend/images/avatar_default.gif',
        'footer' => '&copy; 2014. John Martin and Poopaa Team'
    ],
    'views' => [
        'dashboard' => 'probackend::dashboard.index',
        'userinfo' => 'probackend::behavior.userinfo',
        'login' => 'probackend::behavior.login',
        'error-deny' => 'probackend::errors.deny',
    ],
    'assets' => [
        'css' => [
            'css/probackend.min.css',
        ],
        'js' => [
            'js/scripts.min.js'
        ],
    ],
    
    'datatables' => [
        'table' => [
            'class' => 'table table-bordered table-striped',
            'id' => '',
            'options' => [
                "sPaginationType" => "full_numbers",
                "bProcessing" => false
            ],
            'callbacks' => [],
            'noScript' => false,
            'table_view' => 'probackend::datatable.table',
            'panel_view' => 'probackend::datatable.panel',
            'script_view' => 'probackend::datatable.javascript',
        ],
        'engine' => [
            'exactWordSearch' => false,
        ]
    ],
    "former" => [
        'default_form_type' => 'horizontal',
        'framework' => [
            'viewports' => [
                'large' => 'lg',
                'medium' => 'md',
                'small' => 'sm',
                'mini' => 'xs',
            ],
            'labelWidths' => [
                'large' => 2,
                'small' => 4,
            ],
            'icon' => [
                'tag' => 'span',
                'set' => 'glyphicon',
                'prefix' => 'glyphicon',
            ]
        ],
        'fetch_errors' => true,
        'live_validation' => true,
        'error_messages' => true,
        'push_checkboxes' => false,
        'unchecked_value' => 0,
        'required_class' => 'required',
        'required_text' => '<sup>*</sup>',
        'translate_from' => 'validation.attributes',
        'capitalize_translations' => true,
        'translatable' => [
            'help', 'inlineHelp', 'blockHelp',
            'placeholder', 'data_placeholder',
            'label'
        ],
    ],
    'modules' => [
        'dashboard' => [
            'title' => 'probackend::modules.dashboard.title',
            'permistions' =>[],
            'display' => [
                'icon' => 'icon-screen2',
                'url' => '',
            ]
        ],
        'administrator_group' => [
            'title' => 'probackend::modules.administrator_group.title',
            'permistions' => ['edit' => "Edit Group", 'add' => "Create new group", "delete" => "Delete group", "active" => "Active or deactive group"],
            'display' => [
                'icon' => 'icon-users',
                'url' => 'administrator_group/',
            ]
        ],
        'administrator_user' => [
            'title' => 'probackend::modules.administrator_user.title',
            'permistions' => ['edit' => "Edit Group", 'add' => "Create new group", "delete" => "Delete group", "active" => "Active or deactive group"],
            'display' => [
                'icon' => 'icon-user',
                'url' => 'administrator_user/',
            ]
        ],
    ]
];
